package block

import (
	"encoding/json"

	"github.com/hyperledger/fabric-protos-go/common"
)

func GetConfigInfoJsonStr(configEnvelope *common.ConfigEnvelope) (*string, error) {
	bytJson, err := json.Marshal(configEnvelope.Config)
	if err != nil {
		return nil, err
	}

	ss := string(bytJson)
	return &ss, nil
}
